//时间戳转化为时间
function replaceTime(nS) {
	if(isNaN(nS) == true){
		return ''
	}
	else{
		var date = new Date(parseInt(nS) * 1000);
		var year = date.getFullYear();
		var month = date.getMonth() + 1;
		var day = date.getDate();
		var h = date.getHours();
		var m = date.getMinutes();
		var s = date.getSeconds();
	    return year + '-' + (month < 10 ? "0" + month : month) + '-' + (day < 10 ? "0" + day : day) +  ' ' + (h < 10 ? "0" + h : h) + ':' + (m < 10 ? "0" + m : m) + ':' + (s < 10 ? "0" + s : s);
	}
}

//时间戳转化为日期
function replaceDate(nS) {
	if(isNaN(nS) == true){
		return ''
	}
	else{
		var date = new Date(parseInt(nS) * 1000);
		var year = date.getFullYear();
		var month = date.getMonth() + 1;
		var day = date.getDate();
		var h = date.getHours();
		var m = date.getMinutes();
		var s = date.getSeconds();
	    return year + '-' + (month < 10 ? "0" + month : month) + '-' + (day < 10 ? "0" + day : day);
	}
}